/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.model.qnrlibrary;


import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;


/**
 *
 * @author rejun001
 */
@Entity
@Table( name = "custom_content_items" )
@XmlRootElement
@NamedQueries( 
{
    @NamedQuery( name = "CustomContentItems.findAll" , query = "SELECT c FROM CustomContentItems c" ) ,
    @NamedQuery( name = "CustomContentItems.findByItemId" , query = "SELECT c FROM CustomContentItems c WHERE c.itemId = :itemId" ) ,
    @NamedQuery( name = "CustomContentItems.findByItemSequence" , query = "SELECT c FROM CustomContentItems c WHERE c.itemSequence = :itemSequence" ) ,
    @NamedQuery( name = "CustomContentItems.findByItemType" , query = "SELECT c FROM CustomContentItems c WHERE c.itemType = :itemType" ) ,
    @NamedQuery( name = "CustomContentItems.findByItemNumber" , query = "SELECT c FROM CustomContentItems c WHERE c.itemNumber = :itemNumber" ) ,
    @NamedQuery( name = "CustomContentItems.findByItemWording" , query = "SELECT c FROM CustomContentItems c WHERE c.itemWording = :itemWording" ) ,
    @NamedQuery( name = "CustomContentItems.findByHdrColumnRef" , query = "SELECT c FROM CustomContentItems c WHERE c.hdrColumnRef = :hdrColumnRef" ) ,
    @NamedQuery( name = "CustomContentItems.findByHdrKeycode" , query = "SELECT c FROM CustomContentItems c WHERE c.hdrKeycode = :hdrKeycode" ) ,
    @NamedQuery( name = "CustomContentItems.findByCreatedBy" , query = "SELECT c FROM CustomContentItems c WHERE c.createdBy = :createdBy" ) ,
    @NamedQuery( name = "CustomContentItems.findByDateCreated" , query = "SELECT c FROM CustomContentItems c WHERE c.dateCreated = :dateCreated" ) ,
    @NamedQuery( name = "CustomContentItems.findByModifiedBy" , query = "SELECT c FROM CustomContentItems c WHERE c.modifiedBy = :modifiedBy" ) ,
    @NamedQuery( name = "CustomContentItems.findByDateModified" , query = "SELECT c FROM CustomContentItems c WHERE c.dateModified = :dateModified" )
} )
public class CustomContentItems implements Serializable
{
    private static final long serialVersionUID = 1L;
    @Id
    @Basic( optional = false )
    @Column( name = "item_id" )
    private String itemId;
    @Column( name = "item_sequence" )
    private BigInteger itemSequence;
    @Basic( optional = false )
    @Column( name = "item_type" )
    private String itemType;
    @Column( name = "item_number" )
    private String itemNumber;
    @Column( name = "item_wording" )
    private String itemWording;
    @Column( name = "hdr_column_ref" )
    private String hdrColumnRef;
    @Column( name = "hdr_keycode" )
    private String hdrKeycode;
    @Basic( optional = false )
    @Column( name = "created_by" )
    private String createdBy;
    @Basic( optional = false )
    @Column( name = "date_created" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateCreated;
    @Column( name = "modified_by" )
    private String modifiedBy;
    @Column( name = "date_modified" )
    @Temporal( TemporalType.TIMESTAMP )
    private Date dateModified;
    @JoinColumn( name = "quest_id" , referencedColumnName = "quest_id" )
    @ManyToOne( optional = false )
    private QuestionTitle questId;


    public CustomContentItems()
    {
    }


    public CustomContentItems( String itemId )
    {
        this.itemId = itemId;
    }


    public CustomContentItems( String itemId , String itemType , String createdBy , Date dateCreated )
    {
        this.itemId = itemId;
        this.itemType = itemType;
        this.createdBy = createdBy;
        this.dateCreated = dateCreated;
    }


    public String getItemId()
    {
        return itemId;
    }


    public void setItemId( String itemId )
    {
        this.itemId = itemId;
    }


    public BigInteger getItemSequence()
    {
        return itemSequence;
    }


    public void setItemSequence( BigInteger itemSequence )
    {
        this.itemSequence = itemSequence;
    }


    public String getItemType()
    {
        return itemType;
    }


    public void setItemType( String itemType )
    {
        this.itemType = itemType;
    }


    public String getItemNumber()
    {
        return itemNumber;
    }


    public void setItemNumber( String itemNumber )
    {
        this.itemNumber = itemNumber;
    }


    public String getItemWording()
    {
        return itemWording;
    }


    public void setItemWording( String itemWording )
    {
        this.itemWording = itemWording;
    }


    public String getHdrColumnRef()
    {
        return hdrColumnRef;
    }


    public void setHdrColumnRef( String hdrColumnRef )
    {
        this.hdrColumnRef = hdrColumnRef;
    }


    public String getHdrKeycode()
    {
        return hdrKeycode;
    }


    public void setHdrKeycode( String hdrKeycode )
    {
        this.hdrKeycode = hdrKeycode;
    }


    public String getCreatedBy()
    {
        return createdBy;
    }


    public void setCreatedBy( String createdBy )
    {
        this.createdBy = createdBy;
    }


    public Date getDateCreated()
    {
        return dateCreated;
    }


    public void setDateCreated( Date dateCreated )
    {
        this.dateCreated = dateCreated;
    }


    public String getModifiedBy()
    {
        return modifiedBy;
    }


    public void setModifiedBy( String modifiedBy )
    {
        this.modifiedBy = modifiedBy;
    }


    public Date getDateModified()
    {
        return dateModified;
    }


    public void setDateModified( Date dateModified )
    {
        this.dateModified = dateModified;
    }


    public QuestionTitle getQuestId()
    {
        return questId;
    }


    public void setQuestId( QuestionTitle questId )
    {
        this.questId = questId;
    }


    @Override
    public int hashCode()
    {
        int hash = 0;
        hash += ( itemId != null ? itemId.hashCode() : 0 );
        return hash;
    }


    @Override
    public boolean equals( Object object )
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if ( !( object instanceof CustomContentItems ) )
        {
            return false;
        }
        CustomContentItems other = (CustomContentItems) object;
        if ( ( this.itemId == null && other.itemId != null ) || ( this.itemId != null && !this.itemId.equals( other.itemId ) ) )
        {
            return false;
        }
        return true;
    }


    @Override
    public String toString()
    {
        return "idea.model.qnrlibrary.CustomContentItems[ itemId=" + itemId + " ]";
    }
    
}
